using System;
using System.Collections.Generic;
using NHibernate;
using Symbonix.NorSoNet.Security.DAL.Entities;
using Symbonix.Library.Data.NHibernate;
using NHibernate.Criterion;
using System.Collections;

namespace Symbonix.NorSoNet.Security.DAL.Repositories
{
	public partial class VerificationCodeDataRepository : BaseRepository<VerificationCodeData,Int32>
	{

        public VerificationCodeData GetByGuiId(Guid guiId)
        {
            ICriteria criteria = GetCriteria();
            criteria.Add(Expression.Eq("Code", guiId));
            IList result = criteria.List();
            if (result != null && result.Count > 0)
                return (VerificationCodeData)result[0];
            else
                return null;
        }
	}
}
